﻿@{
    this.SetPageContextValue("area", "admin");
    var aceSetting = this.GetAceSetting();
    var aceSettingJson = SimpleNewtonJsonHelper.Serialize(aceSetting);
    var skin = aceSetting.Skin;
}

<!DOCTYPE html>
<html lang="en">
<head>
    <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1" />
    <meta charset="utf-8" />
    <meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no" />
    <title>SGAdmin - @ViewBag.Title</title>
    <link type="image/x-icon" href="/favicon.ico" rel="icon" />
    @Html.Partial("_AceStyles")
    <!-- styles related to this page -->
    @RenderSection("style", false)

    @Html.Partial("_AceScripts")
</head>

<body class="@skin">

    @Html.Partial("_AceNavBar")

    <div class="main-container" id="main-container">

        @Html.Partial("_AceSideBar")

        <div class="main-content">

            @Html.Partial("_AceBreadcrumbs")

            <div class="page-content">
                

                <!-- PAGE CONTENT BEGINS -->
                @RenderBody()
                <!-- PAGE CONTENT ENDS -->

            </div>
        </div>

        @Html.Partial("_AceFooter")

    </div>

    
    <script>

        (function () {
            'use strict';
        
            //初始化Ace UI
            var aceSetting = jQuery.parseJSON('@Html.Raw(aceSettingJson)');
            //console.log(aceSetting);

            $(document).ready(function () {

                ////First parameter determines whether should become fixed or not.
                ////Second paramtere determines whether to save the changes to cookies/localStorage for later retrieval
                ace.settings.navbar_fixed(aceSetting.FixedNavbar);
                ace.settings.sidebar_fixed(aceSetting.FixedSidebar);
                ace.settings.breadcrumbs_fixed(aceSetting.FixedBreadcrumbs);
                ace.settings.main_container_fixed(aceSetting.InsideContainer);
                //ace.settings.sidebar_collapsed(true, false);
            });

        }());

    </script>

    <!-- scritps related to this page -->
    @RenderSection("scripts", false)
</body>
</html>